CXX := nvcc
TARGET := run_benchmark
CFILES := pocketfft.o
CUDNN_PATH := /usr
HEADERS := -I $(CUDNN_PATH)/include
# LIBS := -L $(CUDNN_PATH)/lib64 -L/usr/local/lib -L /usr/local/cuda-8.0/lib64 -L /usr/local/cuda-8.0/bin -L /usr/include -I ../cuda_samples_h
LIBS := -L $(CUDNN_PATH)/lib64 -L/usr/local/lib -L /usr/local/cuda-11.0/lib64 -L /usr/local/cuda-11.0/bin -L /usr/include -I ../cuda_samples_h
CXXFLAGS :=-arch=sm_35 -std=c++11 -O2



all: main

main: $(TARGET).cu
	gcc -c -std=c99 pocketfft.c
	$(CXX) $(CXXFLAGS) $(HEADERS) $(LIBS) $(TARGET).cu $(CFILES) -o $(TARGET)  \
	-lcufft  -Xcompiler -fopenmp -lcudart -lm -lcudnn -D_GLIBCXX_USE_CXX11_ABI=0  \
	-lineinfo  
	


.phony: clean

clean:
	rm $(TARGET) || echo -n "" 
